﻿using System;
using fastCSharp;

namespace diantou.web.enterprise
{
    /// <summary>
    /// 企业账户记录
    /// </summary>
    [fastCSharp.code.cSharp.webView(IsPage = false, IsPool = true)]
    partial class account : examPermissionView<account>
    {
        /// <summary>
        /// 企业账户记录
        /// </summary>
        [fastCSharp.emit.webView.clearMember]
        private diantou.examDataAccess.enterpriseAccount[] accounts;
        /// <summary>
        /// 默认购买月份
        /// </summary>
        private int buyMonth = 12;
        /// <summary>
        /// 默认购买金额
        /// </summary>
        private int buyPrice = 1000;
        /// <summary>
        /// 购买到期时间
        /// </summary>
        private DateTime buyValidity
        {
            get
            {
                return currentEnterprise.GetBuyEnterpriseValidity(12);
            }
        }
        /// <summary>
        /// 默认独占题库购买月份
        /// </summary>
        private int buyPrivateMonth = 12;
        /// <summary>
        /// 默认独占题库购买金额
        /// </summary>
        private int buyPrivatePrice = 2000;
        /// <summary>
        /// 购买独占题库到期时间
        /// </summary>
        private DateTime buyPrivateValidity
        {
            get
            {
                return currentEnterprise.GetBuyEnterprisePrivateValidity(12);
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="page"></param>
        /// <param name="isAsc"></param>
        /// <returns></returns>
        private bool loadView(int page)
        {
            accounts = diantou.examDataAccess.tcpCall.enterpriseAccount.get(currentUserId, pageInfo.Size = 50, pageInfo.Page = page, out pageInfo.Count);
            return true;
        }
    }
}
